# we'll need to be careful. We'll probably have to build completely
# separate packages from completely separate source trees.
-# Note that we use quilt to handle the debian patches. One of the
-# biggest differences between quilt and say dpatch is that you have to
-# explicitly "quilt add" a file to a patch before you edit it. See
-# "man quilt" for details..
-
# If the source tree ever ends up in an untenable "can't go forward,
# can't go back" state with respect to patching, you can always start
# over by just moving the current debian directory to a newly unpacked
target := $(DEB_HOST_GNU_TYPE)
movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail
-# These files may be modified in the *source* tree during the build.
-# Wonder if we could patch emacs to copy/use these files to/from the
-# build tree... (See Makefile.in's AUTOGENEL definition.)
-protected_files := \
- lisp/cus-load.el \
- lisp/finder-inf.el \
- lisp/loaddefs.el \
- lisp/subdirs.el
-
# Info files that are going to show up in the main dir.
main_dir_info_files := \
efaq
fi
endef
-define build_cmd
- $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
- # If we don't use bootstrap, we need to explicitly build info.
- $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info
-endef
-
# If we ever need to do the stripping outside of dh_strip, just add an
# INSTALL_STRIP="-s" to the make vars below.
localstatedir=/var
endef
-
-
-define patch
- $(quilt) push -a
-endef
-
-define unpatch
- test -z "$$($(quilt) applied)" || $(quilt) pop -a
- rm -f debian/stamp/patch
- rm -rf .pc
-endef
-
define cleanup_all
# distclean goes first so we clean using patched code
rm -f debian/stamp/setup
-$(MAKE) distclean
cd info && rm -f $$(ls | grep -v COPYING | grep -v '^dir$$')
dh_clean
- $(unpatch)
# now clean up bits in the source tree that the above didn't handle
find -name "*.elc" | xargs --no-run-if-empty rm
- if [ -e debian/protected-files.tgz ]; then \
- tar xzpf debian/protected-files.tgz; \
- fi
- rm -f debian/protected-files.tgz
# now clean up everything else (mostly ./debian related stuff)
find -name '*~' | xargs --no-run-if-empty rm -f
rm -f debian/substvars
debian/files*
rm -rf debian/*.tmp
rm -rf $(deb_trash)
- rm -rf .pc
test ! -e debian/stamp || rmdir debian/stamp
endef
define check_diff
- lsdiff -z \
- -x $(src_name)-$(debsrc_ver)/debian/'*' \
- ../$(src_name)_$(debian_ver).diff.gz \
- > debian/tmp-src-lsdiff
- @if test -s debian/tmp-src-lsdiff; \
+ @if quilt series | grep -e '^debian-changes-'; \
then \
- echo "Diffs found outside ./debian in" \
- " ../$(src_name)_$(debsrc_ver).diff.gz"; \
- cat debian/tmp-src-lsdiff; \
+ echo "Diffs found outside ./debian:"; \
+ ls debian/patches/debian-changes-*; \
false; \
else \
echo "../$(src_name)_$(debsrc_ver).diff.gz looks OK."; \
deb_trash += debian/emacsVER-common.README.00
deb_trash += debian/emacsVER-common.README.01
-debian/protected-files.tgz:
- tar czpSf debian/protected-files.tgz.tmp $(protected_files)
- mv debian/protected-files.tgz.tmp $@
-
-debian/stamp/patch: debian/protected-files.tgz
- $(checkdir)
- $(patch)
- mkdir -p $(dir $@) && touch $@
-
-debian/stamp/setup: debian/stamp/patch
+debian/stamp/setup:
$(checkdir)
dh_autotools-dev_updateconfig
aclocal
rm -rf $(1)
mkdir $(1)
cp -a $$(ls -A | grep -v '^debian$$' | grep -v '^.pc$$') "$(1)"
- cd $(1) && CFLAGS="$(CFLAGS)" ../../configure $(confflags) $(2)
+ cd $(1) && CFLAGS="$(CFLAGS)" ./configure $(confflags) $(2)
+endef
+
+define build_cmd
+ $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+ # If we don't use bootstrap, we need to explicitly build info.
+ $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info
endef
# For those who prefer the old-style non-toolkit scrollbars, just add